import objectUtils from "@/utils/object/index.js";

export default objectUtils.freeze({
	name: function mask(name) {
		if (name && name.length > 0) {
			let arr = name.split("");
			let newName = "";
			for (let i = 0; i < arr.length; i++) {
				newName += i === 0 ? arr[i] : "*"
			}
			return newName;
		} else {
			return name;
		}
	}
});